package com.hghivln.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hghivln.pojo.domain.CareOrderItem;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CareOrderItemMapper extends BaseMapper<CareOrderItem> {

    /**
     * 根据处方Id查询处方详情
     *
     * @param coId 处方Id
     * @return List<CareOrderItem>
     */
    List<CareOrderItem> selectCareOrderItemListByCoId(@Param("coId") String coId, @Param("status") String status);

    /**
     * 更新处方详情的状态
     *
     * @param itemIds 处方详情的Id
     * @return int
     */
    int updateByItemIds(@Param("itemIds") List<String> itemIds, @Param("status") String status);

    /**
     * 根据详情ID查询处方详情
     * @param itemIds 详情ID
     * @return List<CareOrderItem>
     */
    List<CareOrderItem> selecByItemIds(List<String> itemIds);
}